import * as mongoose from 'mongoose';
import db from '../lib/db/mongodb';

let userCheckinSchema: mongoose.Schema = new mongoose.Schema({
    sourceId:String,
    date_:String,//签到日期
    month:String,//签到月份
    userId:String,//员工id,
    checkin_time:String,//员工签到的时间
    isCheckInNineAm:Boolean,//是否是上午9:00前签到
    time_getCheckData:String//签到数据 获取的时间   
}, { collection: 'userCheckin' });
export interface UserCheckin extends mongoose.Document {
    sourceId:string;
    date_:string;
    month:string;
    userId:string;
    checkin_time:string;//签到时间点
    isCheckInNineAm:boolean;//是否是上午9:00前签到
    time_getCheckData:string  
}
let userCheckinModel = db.model<UserCheckin>('userCheckin', userCheckinSchema);
//let userCheckinModel = db.model<UserCheckin>('userCheckin', userCheckinSchema);
// let userCheckinModel = db.model('userCheckin', userCheckinSchema);
export default userCheckinModel;